import request from '@/utils/request'

export function getList(params) {
  return request({
    url: '/user/list',
    method: 'get',
    params
  })
}

export function getOnlineNum() {
  return request({
    url: '/user/onlineNum',
    method: 'get'
  })
}

export function userSendMail(data) {
  return request({
    url: '/user/mail',
    method: 'post',
    data
  })
}

export function getUserInfo(uid) {
  return request({
    url: '/user/uid/' + uid,
    method: 'get'
  })
}

export function setUserInfo(data) {
  return request({
    url: '/user/modify',
    method: 'post',
    data
  })
}

export function setUserClosure(params) {
  return request({
    url: '/user/closure',
    method: 'get',
    params
  })
}

export function setWhite(data) {
  return request({
    url: '/user/white',
    method: 'post',
    data
  })
}

export function getNewUser(params) {
  return request({
    url: '/user/newUser',
    method: 'get',
    params
  })
}

export function getPayUser(params) {
  return request({
    url: '/user/payUser',
    method: 'get',
    params
  })
}

export function getIncome(params) {
  return request({
    url: '/user/income',
    method: 'get',
    params
  })
}

export function getExcelUser(params) {
  return request({
    url: '/myexcel/user',
    method: 'post',
    responseType: 'blob',
    params
  })
}
